home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SPEAKN.PAK / SPEAKN.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  3KB  |  86 lines

  1. // speakn.h : Declares the class interfaces for the SpeakN application.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "resource.h"       // resource IDs
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CSpeakNDlg:
  17. //   The main user interface to this application is just one big dialog
  18.  
  19. class CSpeakNDlg : public CDialog
  20. {
  21. // Constructors
  22. public:
  23.     CSpeakNDlg(BOOL bNoPen);
  24.     BOOL LoadLesson(LPCTSTR lpLessonName);
  25.  
  26.     //{{AFX_DATA(CSpeakNDlg)
  27.     enum { IDD = IDD_PENDIALOG };
  28.     CButton m_buttonNext;
  29.     //}}AFX_DATA
  30.  
  31. // Operations
  32.     void        AdvanceLesson();
  33.  
  34. // Attributes (the current question/lesson)
  35.     // current question (from resource)
  36.     CString         m_targetWord;           // target word (upper case)
  37.     CString         m_targetRes;
  38.  
  39.     // resource containing a list of target words and associated bitmap names, in ANSI
  40.     LPCSTR         m_lpszNextQuestion; // empty string => done
  41.  
  42. // Implementation
  43. protected:
  44.     void DoDataExchange(CDataExchange* pDX);
  45.  
  46.     BOOL m_bNoPen;      // TRUE => no PenWindows (run less functional)
  47.     BOOL m_bNoAnswerCheck;  // TRUE => disable test for answer
  48.  
  49.     // special controls
  50.     CFont           m_biggerFont;
  51.     CBitmapButton   m_pictureButton; // main bitmap done as a special button
  52.     CBitmapButton   m_replayButton; // bitmap button for replay sound
  53.  
  54.     // normal Windows controls
  55.     CStatic&    StatusFace()    // face which smiles or frowns
  56.                     { return *(CStatic*)GetDlgItem(IDC_STATUS_FACE); }
  57.     CStatic&    PromptText()    // prompt area
  58.                     { return *(CStatic*)GetDlgItem(IDC_PROMPT_TEXT); }
  59.  
  60.     void        SetAnswerText(LPCTSTR lpsz);
  61.     CEdit&      InputEdit()     // user input for answer text
  62.                                 //  (a normal Edit or a Pen Boxed Edit)
  63.                     { return *(CEdit*)GetDlgItem(IDC_INPUT_EDIT); }
  64.  
  65.     // message handlers
  66.     //{{AFX_MSG(CSpeakNDlg)
  67.     virtual BOOL OnInitDialog();
  68.     afx_msg void OnReplaySound();
  69.     afx_msg void OnUpdateStatus();
  70.     virtual void OnOK();        // Guess
  71.     virtual void OnGiveUp();
  72.     //}}AFX_MSG
  73.     DECLARE_MESSAGE_MAP()
  74. };
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // CSpeakNApp:
  78.  
  79. class CSpeakNApp : public CWinApp
  80. {
  81. public:
  82.     BOOL InitInstance();
  83. };
  84.  
  85. /////////////////////////////////////////////////////////////////////////////
  86.